//
//  XDSearchView.h
//  XDCommonApp
//
//  Created by XD-XY on 3/7/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol XDSearchViewDelegate <NSObject>

-(void)XDSearhViewShouldBeginEditing;
-(void)XDSearchViewShouldReturn;
-(void)XDSearchViewCanelbuttonClick;
-(void)XDSearchTextFieldDidChange;

@end


@interface XDSearchView : UIView<UITextFieldDelegate>
{
    CGRect xRect;
}

@property(nonatomic,assign)id<XDSearchViewDelegate>delegate;

@property (nonatomic,strong)UIImageView * searchIconView; 
@property (nonatomic,strong)UITextField * mytextField;
@property (nonatomic,strong)UIButton * clearBtn; //清空按钮
@property (nonatomic,strong)UIView * bgView; //背景图层

-(void)setBgViewRect:(CGRect)rect;
-(void)clearClick;
@end
